package com.snail.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.snail.mapper.BizTaskMapper;
import com.snail.model.pojo.BizTask;
import com.snail.model.vo.TaskVo;
import com.snail.service.BizTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
* @author Monica
* @description 针对表【biz_task(任务表)】的数据库操作Service实现
* @createDate 2025-07-23 14:30:24
*/
@Service
public class BizTaskServiceImpl extends ServiceImpl<BizTaskMapper, BizTask>
    implements BizTaskService{
    @Autowired
    private BizTaskMapper bizTaskMapper;

    /**
     * 多条件查询任务
     * @param taskType
     * @param difficultyLevel
     * @param needReview
     * @param status
     * @return
     */

    @Override
    public Page<TaskVo> queryTasks(Integer page, Integer size, Integer status, Integer taskType, Integer difficultyLevel, Integer needReview, String keyword) {
        return baseMapper.selectTaskWithUserInfoPage(new Page<>(page, size), status, taskType, difficultyLevel, needReview, keyword);
    }

    @Override
    public boolean logicDelete(Long id) {
        return this.removeById(id);
    }
}




